package com.bjpowernode.workbench.web.service.impl;

import com.bjpowernode.workbench.web.domain.Customer;
import com.bjpowernode.workbench.web.mapper.CustomerMapper;
import com.bjpowernode.workbench.web.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomerServiceImpl implements CustomerService {

    @Autowired
    private  CustomerMapper customerMapper;

    @Override
    public int insertCustomer(Customer customer) {
        return customerMapper.insertCustomer(customer);
    }

    @Override
    public List<Customer> selectCustomerByName(String name) {
        return customerMapper.selectCustomerByName(name);
    }

    @Override
    public Customer selectCustomerIdByCustomerName(String name) {
        return customerMapper.selectCustomerIdByCustomerName(name);
    }
}
